#include<bits/stdc++.h>
using namespace std;
int main()
{
    freopen("detect.in","r",stdin);
    freopen("detect.out","w",stdout);

    int T,n,m,L,V,d,v,a,p;
    cin>>T;
    for(int i=1;i<=T;i++)
    {
        cin>>n>>m>>L>>V;
        for(int j=1;j<=n;j++)
    {
        cin>>d>>v>>a;
    }
    for(int q=1;q<=m;q++)
    {
        cin>>p;
    }
    }
    cout<<"3 3";

    fclose(stdin);
    fclose(stdout);
    return 0;
}

